home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr50 / angel19.zip / ANGELIB.TXT < prev    next >
Text File  |  1993-05-07  |  108KB  |  3,367 lines

  1.                                     ANGELIB for BC7/PDS                        i                                    ___________________
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                 _|||||_  ||_  ||  _|||||_  |||||||  ||       ||  |||||||
  8.                 ||   ||  |||_ ||  ||   ||  ||       ||       ||  ||    ||
  9.                 ||   ||  ||||_||  ||       ||       ||       ||  ||    ||
  10.                 |||||||  || ||||  || ||||  |||||    ||       ||  |||||||
  11.                 ||   ||  || ||||  ||   ||  ||       ||       ||  ||    ||
  12.                 ||   ||  ||  |||  ||   ||  ||       ||       ||  ||    ||
  13.                 ||   ||  ||   ||   |||||   |||||||  |||||||  ||  |||||||
  14.  
  15.  
  16.  
  17.                                          CONTENTS
  18.  
  19.  
  20.  
  21.           I.    DISCLAIMER OF WARRANTY  . . . . . . . . . . . . . . . . . .    1
  22.  
  23.           II.   COPYRIGHT . . . . . . . . . . . . . . . . . . . . . . . . .    1
  24.  
  25.           III.  LICENSE . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  26.  
  27.           IV.   TECHNICAL SUPPORT (HOW TO REACH ME) . . . . . . . . . . . .    2
  28.  
  29.           V.    INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . .    2
  30.  
  31.           VI.   NOTES ABOUT THIS RELEASE  . . . . . . . . . . . . . . . . .    3
  32.  
  33.           VII.  REGISTRATION  . . . . . . . . . . . . . . . . . . . . . . .    4
  34.                 A. How To Order . . . . . . . . . . . . . . . . . . . . . .    4
  35.                 B. Pricing  . . . . . . . . . . . . . . . . . . . . . . . .    5
  36.                 INVOICE & REGISTRATION  . . . . . . . . . . . . . . . . . .    8
  37.  
  38.           VIII. SYSTEM REQUIREMENTS . . . . . . . . . . . . . . . . . . . .    9
  39.  
  40.           IX.   FILES WHICH MAKE UP ANGELIB . . . . . . . . . . . . . . . .    9
  41.  
  42.           X.    USING ANGELIB . . . . . . . . . . . . . . . . . . . . . . .   10
  43.                 Creating a QLB (Quick Library)  . . . . . . . . . . . . . .   10
  44.  
  45.           XI.   REFERENCE . . . . . . . . . . . . . . . . . . . . . . . . .   11
  46.  
  47.           XII.  USING PRINTER FUNCTIONS . . . . . . . . . . . . . . . . . .   48
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                     ANGELIB for BC7/PDS                        1                                    ___________________
  68.  
  69.  
  70.  
  71.  
  72.           I.    DISCLAIMER OF WARRANTY
  73.  
  74.                 I use the routines in ANGELIB almost every day as I write                                      _______
  75.           software and I am regularly adding, enhancing, or fixing.  My software
  76.           will never be "done," and I hope that it gets better and better.  In
  77.           any case, I can't guarantee that it's perfect; in fact, I'll guarantee
  78.           that it's not.  By using this software and documentation ("ANGELIB")
  79.           you must accept this disclaimer of warranty:
  80.  
  81.                 ANGELIB is provided "as is" without any warranties or                _______
  82.           conditions, expressed or implied, including, but not limited to, those
  83.           concerning merchantability and fitness for a particular purpose.  By
  84.           using ANGELIB, you are expressly releasing the author, Angel Babudro,                _______
  85.           from any liability resulting from the use of this software and
  86.           documentation.  You must assume the entire risk of using ANGELIB.                                                                   _______
  87.  
  88.  
  89.           II.   COPYRIGHT
  90.  
  91.                 The author retains the copyright for all ANGELIB source code,                                                         _______
  92.           documentation, assorted files, and all libraries.  However, once
  93.           provided with registration from the author you may distribute any
  94.           program you write with the benefit of ANGELIB, in compiled form only,                                                _______
  95.           without royalties to the author.  You must have written consent from
  96.           the author prior to distributing ANGELIB source code in part or in                                           _______
  97.           whole, whether modified or in original form.
  98.  
  99.  
  100.           III.  LICENSE
  101.  
  102.                 1.  ANGELIB is being distributed as Shareware.  This library is                    _______
  103.           not free, although license is hereby granted for evaluation of the
  104.           Unregistered Edition for an unlimited time.
  105.  
  106.                 2. You may keep as many backup copies of ANGELIB as you wish.                                                          _______
  107.           The Registered Edition is limited to simultaneous use on the number of
  108.           computers indicated by your registration level.  The Unregistered
  109.           Edition may be used on any number of computers.  You may share ANGELIB                                                                         _______
  110.           with others in complete and unmodified form.  REGISTERED USERS may NOT
  111.           distribute the files ending in OBJ.
  112.  
  113.                 3. You MUST NOT charge any fee or receive any consideration for
  114.           distributing the ANGELIB files and you MUST NOT include ANGELIB with
  115.           another business transaction (e.g., a hardware sale) unless you have
  116.           express written consent from the copyright holder, Angel Babudro.  You
  117.           MAY charge a fee of not more than US$6 (six dollars) for the disk
  118.           and/or service of distribution.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                                     ANGELIB for BC7/PDS                        2                                    ___________________
  134.  
  135.  
  136.  
  137.  
  138.           IV.   TECHNICAL SUPPORT (HOW TO REACH ME)
  139.  
  140.                 If my wording is unclear or can't find some topic in here, give
  141.           me a holler and help me fix it or add it to the manual.  A letter or
  142.           BBS message is preferred (and less expensive for you).  Phone calls
  143.           are fine between 9am and 5pm Eastern Time as long as you are a
  144.           registered user or intend to become one.  I thank you for your help in
  145.           making this library better.
  146.  
  147.                 Check out the Registration section below for ways to get a free
  148.           registered copy of ANGELIB.  Sysops please read SYSOP.DOC for special                             _______
  149.           deals.  Shareware vendors please see VENDOR.DOC for distribution
  150.           information.
  151.  
  152.                 I can be reached via the mail or BBS.  The bulletin boards below
  153.           should always have current versions of all my software and I will get
  154.           any messages left there for me.
  155.  
  156.                 Mail        Angel Babudro, "Organic Computer Wizardry",
  157.                             28 Mulberry Street, Clinton, NY  13323-1506,
  158.                             (315) 853-1070 Mon-Fri 9am-5pm Eastern Time
  159.  
  160.                 BBS         Angelo Babudro (to avoid gender confusion)
  161.                 West Coast  Researcher's BBS, So Cal (805) 949-8151 USR HST DS
  162.                 East Coast  Nite Air BBS, Central NY (315) 339-8831 USR HST 14.4
  163.  
  164.  
  165.           V.    INTRODUCTION
  166.  
  167.                 ANGEL.QLB is a "high level" BC7 library for developing business
  168.           applications, especially data base uses.  These are the routines I use
  169.           in developing my apps (with some help from three other shareware
  170.           libraries, most notably John Strong's EZ-Windows which is terrific).
  171.  
  172.                 I put in the things that are simple but a pain to code every
  173.           time, like a "percent completed" bar graph in a window, and things
  174.           that are more complicated, such as a scrollable information window
  175.           with mouse support.  ANGELIB is written in BASIC.  Even though it's                               _______
  176.           not the "tightest" code of its kind I think you will find it very easy
  177.           to use.
  178.  
  179.                 Some of my routines trade flexibility for ease of use, like the
  180.           percentage graph which is always the same colour and at the same spot
  181.           on the screen.  This keeps things simple and provides built-in
  182.           consistency.  Just in case my ideas for standards aren't the same as
  183.           yours :) I have decided to offer the licensing of my source code.
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                                     ANGELIB for BC7/PDS                        3                                    ___________________
  200.  
  201.  
  202.  
  203.  
  204.                 Well, what more can I say?  I hope my library helps you to write
  205.           a bit better and faster.  If so maybe I'll see your registration in my
  206.           mail someday.
  207.  
  208.  
  209.           VI.   NOTES ABOUT THIS RELEASE
  210.  
  211.                 Every release fixes bugs found in previous releases and/or adds
  212.           a few new features.  Here are some notes about each release:
  213.  
  214.           1.9   Full LIB file is now included.  I was severly chastised by the
  215.                 dBASIC Toolkit BBS' sysop for distributing "crippled" software. 
  216.                 Sorry I never saw it that way before, and I find that I am in
  217.                 agreement.  Now you can compile to EXE form, but if you want to
  218.                 distribute and/or sell your software please register the
  219.                 library.
  220.  
  221.           1.8m  All printer & font routines have been updated to allow use on
  222.                 networks using DOS SHARE.
  223.  
  224.           1.8k  Routines updated: ErrScn, FileBackup, SelFont, SelFonts
  225.  
  226.                 Documentation corrected for HelpIndex
  227.  
  228.           1.8j  I slaps myself inna face & says, "What was I thinking?" as I
  229.                     notice that StrFmt's parameters are in reverse order
  230.                     compared to every other similar function in the known
  231.                     universe.  Oops.  Mask & source strings have been swapped.
  232.  
  233.                 Fixed: ChoosePtr% (problem if over 16 printers), Inform%
  234.                     (highlight problem)
  235.  
  236.                 Parameters modified: HelpIndex
  237.  
  238.                 Routines dropped: BackupMethod%, ChooseCountry% - These simple
  239.                     menus are easy to create with John Strong's EZ-Windows, so I
  240.                     took them out to save space.
  241.  
  242.                 Documentation corrected: I forgot to update the documentation
  243.                     for some routines.  Now you can actually use InputDate,
  244.                     FileBackup%, FileRestore%, FileRestores%, FmtFDD%
  245.  
  246.           1.8i  New routines: BarMenu%
  247.  
  248.           1.8h  New routines:
  249.                 ChooseFiles$ allows multiple file names to be chosen (whereas
  250.                     ChooseFile$ allows only one).
  251.                 FileRestores% allows single or multiple files to be selected
  252.                     from a back-up copy.
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                                     ANGELIB for BC7/PDS                        4                                    ___________________
  266.  
  267.  
  268.  
  269.  
  270.                 GetFileNames$ allows more than one input file to be selected.
  271.                 OutDevs$ is identical to OutDev$ but is for use with these other
  272.                     new routines (which all use a common routine from John
  273.                     Strong's EZ-Windows library).
  274.                 GetFileDesc$ retrieves a file's long name from the DESCRIPT.*
  275.                     file
  276.  
  277.                 Renamed ToFDD% to FileBackup% and FromFDD% to FileRestore% - I
  278.                 think these names are easier to remember.
  279.  
  280.  
  281.           VII.  REGISTRATION
  282.  
  283.                 Although I hope that you are so happy with ANGELIB that                                                           _______
  284.           registering will be reward enough in itself, but I think it's more fun
  285.           & exciting to get something new.  ANGELIB is the library I use for                                            _______
  286.           developing all of my applications, so it is constantly updated.  Your
  287.           registered version will be an up-to-the-minute copy.  Other benefits
  288.           of registration that come to my mind include:
  289.  
  290.                 1.  You'll get OBJ files so you can create your own custom
  291.                     libraries.  I use the EZ-Windows and PBClone libraries for
  292.                     some routines (why re-invent the wheel?), so you will need
  293.                     to get them if you want to create custom libraries.  Buying
  294.                     all three libraries will cost around $70 which is far less
  295.                     than most commercial packages.
  296.                 2.  Within days you will get a library that would probably take
  297.                     so long to develop yourself that by the time you've done it
  298.                     you won't need it anymore
  299.                 3.  You can order a printed & bound manual for $8
  300.                 4.  Technical support is possible! You can contact a real
  301.                     programmer who is 98% knowledgeable about the library
  302.                     (nobody's prefect) via mail, phone, or BBS
  303.                 5.  You'll have helped one of the little guys - someone who
  304.                     isn't a huge corporation.  (Thank you...)
  305.  
  306.                 A.  How To Order
  307.  
  308.                 U.S. customers please send cash, check, or money order. 
  309.           Canadian customers please send cash or Canadian International Money
  310.           Order (CIMO).  Customers in other countries please send U.S. funds
  311.           drawn on a U.S. bank.  If you send cash use a "security" no-see-
  312.           through envelope and you may want to send it via Registered mail, too.
  313.  
  314.                 If you prefer to use a credit card, you can order ANGELIB from                                                                  _______
  315.           Public (software) Library with your MC, Visa, AmEx, or Discover card
  316.           by calling 800-242-4PsL (from overseas: 713-524-6394) or by FAX to
  317.           713-524-6398 or by CompuServe to 71355,470.  THESE NUMBERS ARE FOR
  318.           ORDERING ONLY.  I CANNOT be reached at those numbers.  To contact me
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.                                     ANGELIB for BC7/PDS                        5                                    ___________________
  332.  
  333.  
  334.  
  335.  
  336.           for information about dealer pricing, volume discounts, site
  337.           licensing, the status of shipment of the product, the latest version
  338.           number, or for technical information, call 315-852-6942 or write me at
  339.           28 Mulberry Street, Clinton, NY USA 13323-1506.  Shareware is "try
  340.           before you buy" so please understand that product returns are not
  341.           allowed.
  342.  
  343.                 When ordering from PsL ask for product #10799 and please note
  344.           that PsL will add $3 for shipping & handling to U.S. as well as
  345.           Canadian orders.
  346.  
  347.                 B. Pricing
  348.  
  349.           Registration with Disk -- A single copy costs $25.  You will receive
  350.                 the latest version of ANGELIB in LIB (so it can be merged with                                      _______
  351.                 other libraries) and OBJ (to make custom libraries) formats. 
  352.                 You will also receive notification of major updates.  At this
  353.                 time, updates for registered users are $5 or send me a disk and
  354.                 return postage (I'll re-use your envelope).  See below for
  355.                 printed manuals.
  356.  
  357.           Multiple Copies -- Each copy may be used on a single computer at a
  358.                 time.  To ease the financial burden and thank you for being
  359.                 honest, you may apply the following discounts when ordering more
  360.                 than one copy:
  361.                 2 to 5 copies                                       40% discount
  362.                 Over 5 copies                                       50% discount
  363.  
  364.           Site License -- Register a single copy of ANGELIB and purchase a site                                                    _______
  365.                 license which allows you to make copies of the registered
  366.                 version for use on more than one computer owned by the same
  367.                 business.  I would prefer that you order a registered copy and
  368.                 Site License for each physical location of the same business,
  369.                 but this is not required unless you would like to receive update
  370.                 notices at each location.
  371.                    Up to 4 computers                             $30.00 per site
  372.                    Up to 10 computers                            $70.00 per site
  373.                    Up to 20 computers                           $125.00 per site
  374.                    Any number of computers                      $400.00 per site
  375.  
  376.           Manuals -- I will print the latest version of the manual you are
  377.                 reading right now (using Ventura Publisher and a laser printer)
  378.                 and bind it.  I am offering this as a service to those who want
  379.                 a printed, bound manual with their software.  Most of the cost
  380.                 involved here is for materials and extra shipping costs. 
  381.                 Remember that ASCII and WP documentation files are always on
  382.                 disk and if you provide your printer model on the registration
  383.                 form I will send you a file ready to print on your printer.
  384.                 -  One copy                                                $8.00
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                                     ANGELIB for BC7/PDS                        6                                    ___________________
  398.  
  399.  
  400.  
  401.  
  402.                 -  Two or more copies                             $6.00 per copy
  403.  
  404.           Source Code License - You may license the use of the source code for
  405.                 ANGELIB for just $30.  Thereafter, updates will be available for                _______
  406.                 $5 plus shipping.  Please note that I call routines from EZ-
  407.                 Windows (by John Strong) and PBClone (by Tom Hanlin) in my
  408.                 library (why re-invent their wheels?), so you will need to
  409.                 register one or both of these to use some OBJs in creating
  410.                 custom libraries.  I recommend both of them highly and will
  411.                 gladly share unregistered versions of these with you - just ask.
  412.  
  413.           Complimentary Registered Editions - I would like to give you a
  414.                 complimentary registration if you will give me a bit of
  415.                 marketing assistance:
  416.  
  417.                 1. Write a review of my software and post it on a bulletin
  418.                    board, send me a copy of it showing the BBS's header and the
  419.                    name and phone number of the BBS.  Just give me your honest
  420.                    praise and criticism in a decent review.  Your review will be
  421.                    most helpful to me if it mentions your best & worst-liked
  422.                    features and any ideas you have for improvement.  This will
  423.                    help me decide the future of ANGELIB and for that help I will                                                _______
  424.                    send you a complimentary registered disk.
  425.  
  426.                 2. It helps me to know which BBSs carry my software and the more
  427.                    the better, of course!  If you will upload a package to at
  428.                    least five public ("open") BBSs, send me their names and
  429.                    phone numbers and I'll send you a complimentary registered
  430.                    disk.  I would appreciate you uploading to time-share
  431.                    systems, private ("closed") BBSs, or part-time BBS, but
  432.                    please do not use these to apply for a complimentary
  433.                    registered edition.  BTW: I use an HST 14.4 modem so it would
  434.                    be best if you provided me with BBSs which also use HSTs so I
  435.                    can hook-up at high speed.
  436.  
  437.                 3. If you are a consultant or other type of computer
  438.                    professional and your recommendation leads to one or more of
  439.                    your clients purchasing one of my packages, just send me a
  440.                    note with your client's registration or have them mention
  441.                    your name when they register.  I will send a complimentary
  442.                    registered edition or an update for every registration you
  443.                    get for me.  This is in lieu of a multiple copy discount; I
  444.                    intend it for consultants who choose not to deal with sales
  445.                    tax.
  446.  
  447.                 One complimentary registration per person or company.  A
  448.           complimentary registration is just like a paid one - you can upgrade
  449.           it with a site license, purchase manuals, etc.  It helps when you send
  450.           back disks to be re-used - even the envelopes can be re-used.  When
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                                     ANGELIB for BC7/PDS                        7                                    ___________________
  464.  
  465.  
  466.  
  467.  
  468.           you order a complimentary registration please fill in the appropriate
  469.           blanks below PLUS the Invoice so I know what size disk you need, and
  470.           please send me a couple of dollar bills for shipping expenses. 
  471.           Thanks.
  472.  
  473.                 I will promise these complimentary offers until at least
  474.           12/31/93 - after that date please check with me first.
  475.  
  476.  
  477.  
  478.                           COMPLIMENTARY REGISTRATION APPLICATION
  479.                                   Use until Dec. 31, 1993
  480.  
  481.  
  482.                                                              Date_______________
  483.  
  484.                 Please also fill in the Invoice on the following page (put $0
  485.           for the disk).  Include $2.00 for shipping within the U.S. or the
  486.           amount indicated for addresses outside the U.S.  Remember to order
  487.           printed manual(s) if you so desire.
  488.  
  489.  
  490.           (__) Review posted on (BBS name & number)________________________
  491.                 Include a copy of the review, please. Thank you very much!
  492.  
  493.           (__) I uploaded (archive name, like ANGEL18E.ARJ)__________________
  494.                 to these five 24-hour public ("open") BBSs:
  495.  
  496.              BBS Name              Phone Number/Modem Type  Sysop Name             ________              _______________________  __________
  497.  
  498.           1_______________________ ________________________ _______________
  499.           2_______________________ ________________________ _______________
  500.           3_______________________ ________________________ _______________
  501.           4_______________________ ________________________ _______________
  502.           5_______________________ ________________________ _______________
  503.  
  504.              These offers subject to withdrawal or change at any time without
  505.           notice.  All prices are subject to change without notice.  Bulletin
  506.           Board Sysops please see the file SYSOP.DOC for special pricing and
  507.           information; vendors & sysops please see VENDOR.DOC.
  508.  
  509.                         Angel Babudro - "Organic Computer Wizardry"
  510.                         28 Mulberry Street   Clinton, NY 13323-1506
  511.                         (315) 853-6942 Mon-Fri 9am-5pm Eastern Time
  512.                (home phone; remember we're 3 hours later than Pacific coast)
  513.  
  514.                           Please register the Shareware you keep.
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.                                     ANGELIB for BC7/PDS                        8                                    ___________________
  530.  
  531.  
  532.  
  533.  
  534.                                                           INVOICE & REGISTRATION
  535.                                      Credit card orders see "How To Order" above
  536.  
  537.           Your Name_____________________________________________________________
  538.  
  539.           Company Name__________________________________________________________
  540.  
  541.           Address_______________________________________________________________
  542.  
  543.           ______________________________________________________________________
  544.  
  545.           City___________________________ State/Prov________ Zip________________
  546.  
  547.           Registration     Registration & disk: $25 x qty _____        $_______ 
  548.  
  549.           Source Code      Source disk & license: $30 x qty _____       _______ 
  550.  
  551.           Multiple/        2-4 disks -- deduct 40%
  552.           Wholesale        5 or more -- deduct 50%                     (_______)
  553.  
  554.           Site License     Up to 4 CPUs add $30; Up to 10 add $70
  555.           (add to above)   Up to 20 add $125; Unlimited add $400        _______ 
  556.  
  557.           Printed          One copy is $8, 2 or more are $6 each
  558.           Manuals          Qty _____ x $_____ each                      _______ 
  559.  
  560.           Shipping &       Canada, AK, HI, VI, PR add $3 extra          _______ 
  561.            Expenses        Other countries add $9 per copy              _______ 
  562.  
  563.                            ** T O T A L **                              _______ 
  564.  
  565.  
  566.           Disk size & quantity   [__] 3½"                   [__] 5¼"
  567.           Drive density          [__] Low (DD) required     [__] High (HD) okay
  568.           Extended densities     [__] FDFORMAT extended densities okay
  569.  
  570.           Which version are you using now?_____________________________________
  571.  
  572.           Where did you get it?________________________________________________
  573.  
  574.  
  575.           ANGELIB has been delivered to and accepted by customer.  Upon receipt          _______
  576.           of this paid invoice the latest Registered Edition disk and any
  577.           options chosen above will be sent.  Send U.S. funds or CIMO.  NYS
  578.           orders add local sales tax.  Mail this page with your cash (use
  579.           Registered mail), cheque or money order to Angel Babudro, 28 Mulberry
  580.           Street, Clinton, NY USA 13323-1506. Please allow 1-3 weeks. Thank you!
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.                                     ANGELIB for BC7/PDS                        9                                    ___________________
  596.  
  597.  
  598.  
  599.  
  600.           VIII. SYSTEM REQUIREMENTS
  601.  
  602.                 All you need is PC/MS-DOS 3.3 or later, PDS/BC 7.1, and a
  603.           computer.  You will need 200k to 500k of disk space for the files,
  604.           depending on which ones you decide to keep around.
  605.  
  606.  
  607.           IX.   FILES WHICH MAKE UP ANGELIB
  608.  
  609.                 The unregistered edition is made up of the following files:
  610.  
  611.                 ANGEL.LIB     The linker library to make EXE files (see
  612.                               MAKEQLB.TXT for info on making a QLB file)
  613.                 ANGEL.BI      The include file, function & subroutine
  614.                               definitions
  615.                 COLOURS.BI    Colour codes definitions, use is optional
  616.                 FKEYS.BI      Function key definitions, use is optional
  617.                 ANGEL.TXT     The ASCII text file of this document
  618.                 ANGEL.WP      The WordPerfect file of this document (so you can
  619.                               format it for your printer)
  620.                 QSORT.BAS     Source code to this public domain routine
  621.                 FKEY.LST      Sample file for use with FKEYS routine
  622.                 READ.ME       A file containing late-breaking news...  May or
  623.                               may not be part of the package you get
  624.                 ORDER.FRM     Order form for all of my software
  625.                 SYSOP.DOC     Sysop information
  626.                 VENDOR.DOC    Disk vendors & Sysops: pricing, detailed
  627.                               description, and distribution information
  628.                 COMPARE.EXE   A byte-by-byte file compare utility.  Displays in
  629.                               hex, decimal, and ASCII. Type COMPARE for help.
  630.                 DUMP.EXE      Hex/octal/decimal file viewer. Type DUMP for help.
  631.  
  632.                 The registered edition also includes:
  633.  
  634.                 FAROBJ.EXE    Object modules for creating custom libraries
  635.                               (self-extracting archive)
  636.                 MLIB.BAT      Sample batch file for creating custom libraries
  637.                               from OBJ modules.  I use it all the time to re-
  638.                               compile libraries during software development. 
  639.                               Allows OBJs to be anywhere you like rather than
  640.                               all in one directory
  641.                 MLIB.LSP      Sample specification file for MLIB.BAT
  642.                 ANGEL.INF     Object module information file for use with Tom
  643.                               Hanlin's LIBWIZ utility - this makes it MUCH
  644.                               easier to create your own custom libraries if
  645.                               you've never done it before.
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.                                     ANGELIB for BC7/PDS                       10                                    ___________________
  662.  
  663.  
  664.  
  665.  
  666.           X.    USING ANGELIB
  667.  
  668.                 Basically, just put the files wherever you want them and use the
  669.           INCLUDE meta-command to place the .BI definition files in your
  670.           programme (e.g., '$INCLUDE: 'Angel.bi' and '$INCLUDE: 'PtrRec.def'). 
  671.           Using the $INCLUDE file lets you call subroutines without the CALL key
  672.           word.
  673.  
  674.                 Creating a QLB (Quick Library)
  675.  
  676.                 If you want to use ANGEL.LIB routines in the QBX interactive
  677.           environment you need to make a file called ANGEL.QLB first.  To do
  678.           this just use the command:
  679.  
  680.                 link /qu angel.lib,angel.qlb,nul,qbxqlb;
  681.  
  682.                 If you get "Bad command or file name" you will need to supply
  683.           the drive and path containing the file LINK.EXE.
  684.  
  685.                 When you start QBX just use "QBX /L d:\path\ANGEL" (replacing
  686.           d:\path with your drive and pathname) - this will load the quick
  687.           library into memory so you can run the routines.  Please note that
  688.           it's a large library; if you have extended memory QBX will load some
  689.           of the library "high."  If you run out of memory with a large
  690.           programme I can only console you with the fact that most of my
  691.           software is too large to run in the QBX environment and the Microsoft
  692.           help-line wasn't even able to help me.
  693.  
  694.                 Rather than write a probably-lame demonstration programme to
  695.           show off ANGELIB's functions, I would like to suggest that you check                   _______
  696.           out my shareware from whence this library sprang:  What Mailing List?
  697.           (WML), What Vehicle History? (WVH), What Job Summary? (WJS), What
  698.           Floppy Format? (WFF), and What Tape Back-up (WTB).
  699.  
  700.                 Registered Edition users have individual OBJ files which can be
  701.           combined into custom libraries, even adding OBJs from other libraries
  702.           (such as EZ-Windows) or your own routines.  I find it easiest to make
  703.           a file, using an ASCII editor, which contains all of the names of the
  704.           OBJs I want in the library (see MLIB.LSP for a sample).  This file
  705.           contains one routine per line, preceded by a "+" and ending with a "&"
  706.           (which is what LIB requires since this file is passed directly to
  707.           LIB.EXE).  This makes it easy to recompile the library if you changed
  708.           some code or want to add or delete routines.
  709.  
  710.                 Another alternative for making your own libraries is to use Tom
  711.           Hanlin's LIBWIZ utility.  This makes things very easy since LIBWIZ is
  712.           smart enough to figure out if a routine requires others (for example,
  713.           the INFORM%() function requires several other routines) and will
  714.           include those other routines automatically.  The drawback to LIBWIZ is
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.                                     ANGELIB for BC7/PDS                       11                                    ___________________
  728.  
  729.  
  730.  
  731.  
  732.           that it has no "save" feature so you have to select each module every
  733.           time (which can get a bit tedious if you have 50 modules or so).  If
  734.           you've never tried LIBWIZ you ought to at least check it out.  The
  735.           most current version I know of is LIBWIZ13.  To use it just enter
  736.           LIBWIZ ANGEL mylibname (where "mylibname" is your library's name).
  737.  
  738.  
  739.           XI.   REFERENCE
  740.  
  741.                 ANGELIB is made up of functions and subroutines.  Functions                _______
  742.           return a value to a variable - e.g., a% = CalcAttr(White, Blue) puts a
  743.           value in a% - whereas subroutines do not - e.g., BackUpMsg just prints
  744.           a message on the screen.
  745.  
  746.                 The general syntax of a function call is
  747.           var = Function(param1,param2,etc).  For a subroutine, the "formal"          _________________________________
  748.           syntax is "[CALL] subname(param1, param2, etc.)" although "CALL" is                     ____________________________________
  749.           not needed when you include ANGEL.BI in your code.
  750.  
  751.                 Subroutines do not yield any "result," but they often modify one
  752.           or more variables which are passed to them.  DBFHeader is a good
  753.           example of this.
  754.  
  755.                 The routines below each show their name at the left margin and a
  756.           sample calling sequence aligned with the right margin, under which is
  757.           the english explanation of the routine's purpose followed by the
  758.           definition of variables.
  759.  
  760.  
  761.           BackupMsg                                                    BackupMsg
  762.             Prints  what I think of  as a pseudo-subliminal reminder to back-up
  763.             your data  :)  A little reminder pops  onto the screen for a second
  764.             then the screen is cleared.
  765.  
  766.             Pass            ____
  767.                  Nothing
  768.  
  769.             Returns            _______
  770.                  Nothing
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.                                     ANGELIB for BC7/PDS                       12                                    ___________________
  794.  
  795.  
  796.  
  797.  
  798.           BarMenu%    opt% = BarMenu%(r%,c%,norm%,rev%,opts$(),seed%,getit%,ms%)
  799.             Displays  a horizontal bar menu and  waits for user's choice of the
  800.             options.
  801.  
  802.             Pass            ____
  803.                  r%/c%       Row and column at which to begin displaying
  804.  
  805.                  norm%/rev%  Normal   &   reverse   display   attributes   (via
  806.                              CalcAttr%)
  807.  
  808.                  opts$()     String array containing choices
  809.  
  810.                  seed%       Option  number  to  highlight initially  (normally
  811.                              "1")
  812.  
  813.                  getit%      Flag to  get user's input:   If true routine waits
  814.                              for user  to select an option or press an extended
  815.                              key (e.g., an arrow,  PgUp, etc.) or ENTER or Esc.
  816.                              If  False,  the  routine  displays the  menu  then
  817.                              exits (which is  useful for displaying a bunch  of
  818.                              horizontal menus on a setup screen, for example).
  819.  
  820.                  ms%         Mouse support (0=no, non-zero=yes)
  821.  
  822.             Returns            _______
  823.                  Function    If getit%  is true, the  user's final keypress  is
  824.                              returned - ENTER  (13), Esc (27), or extended  key
  825.                              code (2nd byte of code).  If getit% is false  then
  826.                              the returned value is irrelevant.
  827.  
  828.                  seed%       The number of the highlighted item, numbered  from
  829.                              left to right starting with one.
  830.  
  831.  
  832.  
  833.  
  834.           CalcAttr%                             attr% = CalcAttr% (Fore%, Back%)
  835.             For use with routines that need a single integer colour code.
  836.  
  837.             Pass            ____
  838.                  Fore%       Foreground colour code
  839.  
  840.                  Back%       Background colour code
  841.  
  842.             Returns            _______
  843.                  Fore% + (Back% * 16)
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.                                     ANGELIB for BC7/PDS                       13                                    ___________________
  860.  
  861.  
  862.  
  863.  
  864.           ChooseFD$                                             fdd$ = ChooseFD$
  865.             This is a menu of available floppy disk drives.  The function:
  866.  
  867.             1.   Checks the number of floppy disk drives
  868.  
  869.             2.   If there is only one drive then "A:" is returned, otherwise
  870.  
  871.             3.   A pop-up  menu of  floppy drives is  presented from  which the
  872.                  user may choose one or press Esc.
  873.  
  874.             Pass            ____
  875.                  Nothing
  876.  
  877.             Returns            _______
  878.                  Floppy disk  drive  letter followed  by a  colon, or  a  blank
  879.                  string if user presses Esc.
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.                                     ANGELIB for BC7/PDS                       14                                    ___________________
  926.  
  927.  
  928.  
  929.  
  930.           ChooseFile$         File$ = ChooseFile$(FSpec$,Exclude$,ExtInfo%,ms%))
  931.             Presents  a  scrollable  list  of files  in  a  window which  match
  932.             FileSpec$ (excluding Exclude$) and waits for user to choose one.
  933.  
  934.             Pass            ____
  935.                  FSpec$      File specification  to include in  the list.   May
  936.                              include drive  and path name,  if necessary.   For
  937.                              example, "*.DAT" or "C:\DATA\*.DAT" are valid.
  938.  
  939.                  Exclude$    File   specification  to  exclude  from  the  list
  940.                              (e.g., "*.bak").   Do  not put a drive  or path in
  941.                              this.
  942.  
  943.                  ExtInfo%    Extended   Information   flag   &   record   size.
  944.                              Controls  display  of  extended information  (file
  945.                              size &  long description).   Set this variable  to
  946.                              zero  for no  extra file  information,  or to  the
  947.                              record size to show the number  of records in  the
  948.                              file  along with description (if a file DESCRIPT.*
  949.                              is  in  the directory  it  will be  used for  file
  950.                              descriptions).    To  show size  in  bytes  use  a
  951.                              record size of one.  If  negative information will
  952.                              be  in  DOS  Name/Size/Description   order.     If
  953.                              positive  Description/Name/Size   order  will   be
  954.                              displayed.
  955.  
  956.                  ms%         Mouse support flag (true/false).
  957.  
  958.             Returns            _______
  959.                  File name  chosen without  drive or path, or  null string ("")                                   _______
  960.                  if user presses Esc
  961.  
  962.             Notes            _____
  963.                  If ExtInfo%  is non-zero,  font files *.SFP and  *.SFL will be
  964.             shown with  their font  names and  other files  will be shown  with
  965.             their size & any description.
  966.                  I  patterned the  format of  the DESCRIPT.*  file after  4DOS:
  967.             file name  followed by  a space  and up  to 40  characters for  the
  968.             description.  4DOS makes a hidden file, however.  ChooseFile$  will
  969.             only  read "normal" (not  hidden) files right now.   I'll soon have
  970.             it so ChooseFile$ will read hidden files, too.
  971.                  ChooseFile$()  uses the  EZ-Windows  routine ScrlMenu  and the
  972.             PBClone routines ScrSave & ScrRest.
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.                                     ANGELIB for BC7/PDS                       15                                    ___________________
  992.  
  993.  
  994.  
  995.  
  996.           ChooseFileS$             F$ = ChooseFileS$(Inc$,Exc$,Info%,many%,ms%))
  997.             Shows a scrollable  list of files in a  window which match Inc$ and
  998.             excluding Exc$ then waits for user to choose one or more.
  999.  
  1000.             Pass            ____
  1001.                  Inc$        File specification  to include in  the list.   May
  1002.                              include drive  and path name,  if necessary.   For
  1003.                              example, "*.DAT" or "C:\DATA\*.DAT" are valid.
  1004.  
  1005.                  Exc$        File   specification  to  exclude  from  the  list
  1006.                              (e.g., "*.bak").   Do  not put a drive  or path in
  1007.                              this.
  1008.  
  1009.                  Info%       Extended   Information   flag   &   record   size.
  1010.                              Controls  display  of  extended information  (file
  1011.                              size &  long description).   Set this variable  to
  1012.                              zero  for no  extra file  information,  or to  the
  1013.                              record size to show the number  of records in  the
  1014.                              file  along with description (if a file DESCRIPT.*
  1015.                              is  in  the directory  it  will be  used for  file
  1016.                              descriptions).    To  show size  in  bytes  use  a
  1017.                              record size of one.  If  negative information will
  1018.                              be  in  DOS  Name/Size/Description   order.     If
  1019.                              positive  Description/Name/Size   order  will   be
  1020.                              displayed.
  1021.  
  1022.                  many%       True=Allow multiple picks, False=Just one
  1023.  
  1024.                  ms%         Mouse support flag (true/false).
  1025.  
  1026.             Returns            _______
  1027.                  File names without drive or  path, or null string ("") if user                            _______
  1028.                  presses Esc. Names are padded to length of 12.
  1029.  
  1030.             Notes            _____
  1031.                  This  routine ends  up  about  10k larger  than  ChooseFile$()
  1032.             since it requires  an EZ-Windows routine (ScrlTag) which the  other
  1033.             routine does not.  If your  programme already uses ScrlTag you will
  1034.             only see a slight increase in your programme size  (about .5k) over
  1035.             using ChooseFile$().  See ChooseFile$() for other notes.
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.                                     ANGELIB for BC7/PDS                       16                                    ___________________
  1058.  
  1059.  
  1060.  
  1061.  
  1062.           ChoosePort%                      PtrPort% = ChoosePort%(default%, ms%)
  1063.             Presents a pop-up menu of printer ports (LPT1, LPT2, and LPT3)  and
  1064.             waits for user to pick one or press Esc.
  1065.  
  1066.             Pass            ____
  1067.                  default%    Default (current) printer port setting (1-3).
  1068.  
  1069.                  ms%         Mouse support available: 0 = No, 1 = Yes
  1070.  
  1071.             Returns            _______
  1072.                  Port number (1-3) or zero if user presses Esc
  1073.  
  1074.  
  1075.  
  1076.  
  1077.           ChoosePtr%      Ok% = ChoosePtr%(pType$, path$, PtrNo%, PtrPort%, ms%)
  1078.             Presents a  pop-up menu  of  printer choices  from the  PRINTER.DAT
  1079.             file.   If there are less than 15 choices (that is, all choices fit
  1080.             inside the window), then the default (PtrNo%) will be highlighted.
  1081.  
  1082.             Pass            ____
  1083.                  pType$      Printer types to include in the menu:
  1084.                              D = Dot matrix printers
  1085.                              L = Laser printers
  1086.                              B = Both
  1087.  
  1088.                  path$       File  specification  for  PRINTER.DAT file.  path$
  1089.                              may contain a  drive, path, and/or file name.   If
  1090.                              no  file name  is given, PRINTER.DAT is  used.  If
  1091.                              no  drive &  path are  given, the  current drive &
  1092.                              path are used.
  1093.  
  1094.                  PtrNo%      Record  number  of  currently  chosen  printer  in
  1095.                              PRINTER.DAT
  1096.  
  1097.                  ms%         0 = Keyboard only
  1098.                              1 = Use mouse, too
  1099.  
  1100.             Returns            _______
  1101.                  pType$      Changed  to "D"  if dot  matrix  chosen or  "L" if
  1102.                              laser printer chosen
  1103.  
  1104.                  PtrNo%      PRINTER.DAT record number for the chosen printer
  1105.  
  1106.                  PtrPort%    The port number selected for the  printer (LPT1 is
  1107.                              1, LPT2 is 2, etc.) or zero if user presses Esc
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.                                     ANGELIB for BC7/PDS                       17                                    ___________________
  1124.  
  1125.  
  1126.  
  1127.  
  1128.           ContCan%                                                 i% = ContCan%
  1129.             Displays  "Continue" and "Cancel" keys  at the bottom of the screen
  1130.             and waits for response.
  1131.  
  1132.             Pass            ____
  1133.                  Nothing
  1134.  
  1135.             Returns            _______
  1136.                  TRUE (-1) if user presses Esc
  1137.                  FALSE (0) if user presses Return (aka Enter)
  1138.  
  1139.  
  1140.  
  1141.  
  1142.           DateFmt$                  FormattedDate$ = DateFmt$(d%, m%, y%, intl%)
  1143.             I use this routine to print  the formatted date after getting input
  1144.             from  the user.   You  can  "PRINT DateFmt$()" or  assign it  to  a
  1145.             variable.  Use the ChooseCountry% menu to let the user set Intl%.
  1146.  
  1147.             Pass            ____
  1148.                  d%          Day on the month
  1149.                  m%          Month number
  1150.                  y%          Year (4-digits)
  1151.                  Intl%       International formatting
  1152.                              1 = USA (mm/dd/yyyy)
  1153.                              2 = Canadian (dd-mm-yyyy)
  1154.                              3 = USA & Cdn (dd MoName yyyy)
  1155.                              4 = International (dd MoName yyyy)
  1156.  
  1157.             Returns            _______
  1158.                  Formatted date
  1159.  
  1160.  
  1161.  
  1162.  
  1163.           DateVal%                                      dv% = DateVal%(TheDate$)
  1164.             Converts  dates from 1992  to 2078  to an  integer number  for date
  1165.             calculations.   For  example,  DateVal%(Date1$)  - DateVal%(Date2$)
  1166.             would give  you the number  of days between the  two dates.   Years
  1167.             prior to 1992 are converted to 1992.
  1168.  
  1169.             Pass            ____
  1170.                  TheDate$    Date formatted the same as BASIC's DATE$ function
  1171.  
  1172.             Returns            _______
  1173.                  Integer value based on the date
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.                                     ANGELIB for BC7/PDS                       18                                    ___________________
  1190.  
  1191.  
  1192.  
  1193.  
  1194.           DBFHeader             DBFHeader file$, Fld$(), reclen%, recs&, NoFlds%
  1195.             Opens  .DBF  file FileName$  and returns  field names  in Field$(),
  1196.             record length in  reclen%, number of records in  the file in recs&,
  1197.             and number  of fields in NoFields%.   You can  then call DBFPickFld
  1198.             to pick fields from the list.  See also DBFPickFld function.
  1199.  
  1200.             Pass            ____
  1201.                  file$       The DBF  file name, including  drive and path,  if
  1202.                              necessary
  1203.  
  1204.                  Fld$()      This array  must be initialized  prior to  calling
  1205.                              DBFHeader  to  the  maximum  number of  fields  (I
  1206.                              would suggest  setting it to  at least 50,  unless
  1207.                              you know better).
  1208.  
  1209.             Returns            _______
  1210.                  Fld$()      The names of the fields.  The first field name  is
  1211.                              in Field$(1), etc.
  1212.  
  1213.                  reclen%     The file's record length
  1214.  
  1215.                  recs&       The number of records on file
  1216.  
  1217.                  NoFlds%     The number of fields
  1218.  
  1219.  
  1220.  
  1221.  
  1222.           DBFPickFld%                 fld% = DBFPickFld%(iRow%, iCol%, field$())
  1223.             Presents the list  of field names of a  .DBF file at and waits  for
  1224.             user  to select one.   See also DBFHeader  which will fill field$()
  1225.             with field names.
  1226.  
  1227.                  iRow%       Top row of window
  1228.  
  1229.                  iCol%       Left column of window
  1230.  
  1231.                  field$()    Array containing field names from which to choose
  1232.  
  1233.                  ms%         Mouse flag: 0 = no mouse, non-zero = use mouse
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.                                     ANGELIB for BC7/PDS                       19                                    ___________________
  1256.  
  1257.  
  1258.  
  1259.  
  1260.           DBFShowFields       DBFShowFields row%, col%, show%, field$(), hilite%
  1261.             Displays a  window filled  with field names  found in  the field$()
  1262.             variable (which  can be  set via DBFHeader).   Field number hilite%
  1263.             will  be highlighted and  placed in  the centre  of the  window (if
  1264.             possible).
  1265.  
  1266.             Pass            ____
  1267.                  row%        Top screen row of window (box corner)
  1268.                  col%        Top left corner of window
  1269.                  show%       Number of fields to show in the window
  1270.  
  1271.                  field$()    A  2-dimensional  array  field$(1-fieldnum,  0-2).
  1272.                              field$(fieldnum,0) is the field name
  1273.                              field$(fieldnum,1) is the field type
  1274.                              field$(fieldnum,2) is the field length
  1275.  
  1276.                              All you  need to do is dimension field$() and then
  1277.                              pass it to DBFHeader which will  fill it with  the
  1278.                              field specs.
  1279.  
  1280.                              Note:  DBFHeader sets  field$(1,x) to  "None"  and
  1281.                              this routine  also expects  field$(1,x) to be  the
  1282.                              "None" field.
  1283.  
  1284.                  hilite%     Indicates  the field  number to  highlight  on the
  1285.                              screen (a value of zero highlights  nothing).  The
  1286.                              first field  in the  window is  Max%(1,hilite%-5),
  1287.                              so if  hilite%=1,2,3,4, or  5 the  first field  in
  1288.                              the window is #1; if hilite%=6 the first  field is
  1289.                              #2, etc.
  1290.  
  1291.             Returns            _______
  1292.                  Nothing
  1293.  
  1294.  
  1295.  
  1296.  
  1297.           Delay                                                       Delay Sec!
  1298.             Delays for Sec! seconds.  I use this for copyright messages, etc.
  1299.  
  1300.             Pass            ____
  1301.                  Sec!        Number of seconds to delay (floating point)
  1302.  
  1303.             Returns            _______
  1304.                  Nothing
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.                                     ANGELIB for BC7/PDS                       20                                    ___________________
  1322.  
  1323.  
  1324.  
  1325.  
  1326.           DrawFDD                                   DrawFDD Light%, iRow%, iCol%
  1327.             Draws a text picture of a floppy on the screen at iRow%,iCol%.   If
  1328.             Light% is  TRUE (-1)  then the  light blinks  red (bright  white on
  1329.             mono monitors), else it is white.
  1330.  
  1331.             Pass            ____
  1332.                  Light%      True if drive "light" is to blink, false if not
  1333.  
  1334.                  iRow%       Top row of picture
  1335.  
  1336.                  iCol%       Left column of picture
  1337.  
  1338.             Returns            _______
  1339.                  Nothing
  1340.  
  1341.  
  1342.  
  1343.  
  1344.           DrawHDD                             DrawHDD Light%, iRow%, iCol%, Msg$
  1345.             Similar  to DrawFDD but  draws a  text picture  of a hard  disk and
  1346.             places the current drive (CURDRIVE) letter in the box.
  1347.  
  1348.             Pass            ____
  1349.                  Light%      True if drive "light" is to blink, else false
  1350.  
  1351.                  iRow%       Top row of picture
  1352.  
  1353.                  iCol%       Left column of picture
  1354.  
  1355.                  Msg$        A  message up  to 20  characters  long to  display
  1356.                              inside the  picture.  If  longer than  20 chars it
  1357.                              will be truncated.
  1358.  
  1359.             Returns            _______
  1360.                  Nothing
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.                                     ANGELIB for BC7/PDS                       21                                    ___________________
  1388.  
  1389.  
  1390.  
  1391.  
  1392.           DrvSpace                         DrvSpace (Drive$, Total&, Free&, EC%)
  1393.             Returns total space and free space (in bytes) of drive Drive$.
  1394.  
  1395.             Pass            ____
  1396.                  Drive$      Disk drive letter (e.g., "C")
  1397.  
  1398.             Returns            _______
  1399.                  Total&      Total bytes are returned in this variable
  1400.  
  1401.                  Free&       Free bytes are returned in this variable
  1402.  
  1403.                  EC%         DOS error  code is  returned in  this variable  or
  1404.                              zero if no error
  1405.  
  1406.  
  1407.  
  1408.  
  1409.           ElapsedTime         ElapsedTime STime$, ETime$, Hour%, Minutes%, Secs%
  1410.             Calculates elapsed time.
  1411.  
  1412.             Pass            ____
  1413.                  STime$      Starting  time  hh:mm:ss  (same  format  as  TIME$
  1414.                              function)
  1415.  
  1416.                  ETime$      Ending  time   hh:mm:ss  (same   format  as  TIME$
  1417.                              function)
  1418.  
  1419.             Returns            _______
  1420.                  ETime$      Formatted elapsed time (hh:mm:ss)
  1421.                  Hour%       Elapsed hours
  1422.                  Minutes%    Elapsed minutes
  1423.                  Secs%       Elapsed seconds
  1424.  
  1425.             Example            _______
  1426.                  S$ = TIME$              'Starting time
  1427.                  (do whatever needs to be done)
  1428.                  E$ = TIME$              'Ending time
  1429.                  ElapsedTime S$, E$, H%, M%, S%
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.                                     ANGELIB for BC7/PDS                       22                                    ___________________
  1454.  
  1455.  
  1456.  
  1457.  
  1458.           ErrScn                                        ErrScn ErrCode%, Module$
  1459.             Presents  an  error  screen showing  error  number,  english  text,
  1460.             possible solution, and module name.
  1461.  
  1462.             Pass            ____
  1463.                  ErrCode%    Error number
  1464.  
  1465.                  Module$     Module name
  1466.  
  1467.             Returns            _______
  1468.                  Nothing
  1469.  
  1470.  
  1471.  
  1472.  
  1473.           ErrSolve$                                            ErrSolve$ Number%
  1474.             Prints  possible  solution  to  error  number  Number%.    Used  by
  1475.             subroutine ErrScn.   Not  very extensive (to  save memory),  but it
  1476.             sure beats no error handling...
  1477.  
  1478.  
  1479.  
  1480.  
  1481.           ErrText$                                              ErrText$ Number%
  1482.             Prints text of error Number%.  Used by ErrScn.
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.                                     ANGELIB for BC7/PDS                       23                                    ___________________
  1520.  
  1521.  
  1522.  
  1523.  
  1524.           FileBackup%                      ec% = FileBackup%(FileMask$, Method%)
  1525.             Asks for  user to  enter path (including  drive) on which  to store
  1526.             the   back-up  (e.g.,  "A:\"   or  "\TEMP\BACKUPS")  then  backs-up
  1527.             FileMask$ to drive Drive$ using Method%.
  1528.  
  1529.             Pass            ____
  1530.                  FileMask$   File  mask  to  include  in  restore  (e.g.,  *.*,
  1531.                              *.DAT, OLD??.*, etc.)
  1532.  
  1533.                  Method%     The method to use in making the back-up
  1534.                              1 = DOS Copy
  1535.                              2 = ARJ (req. a lot of free memory)
  1536.                              3 = LHARC
  1537.                              4 = PKZIP
  1538.  
  1539.             Returns            _______
  1540.                  0 = Completed
  1541.                  1 = Cancelled
  1542.                  2 = Bad file mask
  1543.                  3 = No files matching file mask
  1544.  
  1545.             Notes            _____
  1546.                  Requires GetValidPath$() function (GETPATH.OBJ)
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.                                     ANGELIB for BC7/PDS                       24                                    ___________________
  1586.  
  1587.  
  1588.  
  1589.  
  1590.           FileRestore%                    ec% = FileRestore%(FileMask$, Method%)
  1591.             Menu of  floppy drives  then if  Method% is  2, 3, or  4 a  menu of
  1592.             files matching  FileMask$ (user  can select  one to  restore).   If
  1593.             Method%=1 all files matching FileMask$ are restored.
  1594.  
  1595.             Pass            ____
  1596.                  FileMask$   Files to restore (*.*, *.DAT, OLD??.*, etc.)
  1597.  
  1598.                  Method%     The method to use in restoring
  1599.                              1 = DOS Copy
  1600.                              2 = ARJ (req. a lot of free memory)
  1601.                              3 = LHARC
  1602.                              4 = PKZIP
  1603.                              Anything else = DOS Copy
  1604.  
  1605.             Returns            _______
  1606.                  0 = Completed
  1607.                  1 = Cancelled
  1608.                  2 = Bad file mask
  1609.                  3 = No files matching file mask
  1610.  
  1611.             Notes            _____
  1612.                  Requires ChooseFile$() function (CHOOSEFL.OBJ).
  1613.  
  1614.  
  1615.  
  1616.  
  1617.           FileRestores%                  ec% = FileRestores%(FileMask$, Method%)
  1618.             Same  as FileRestore%() function  above except that user can select
  1619.             one  or  multiple  files  to restore.    See  FileRestore%() for  a
  1620.             description of the parameters.
  1621.  
  1622.             Notes            _____
  1623.                  Requires ChooseFileS$()  function (CHOOSEFS.OBJ).  Will add ½k
  1624.             to 10k to your code size over using FileRestore%().
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.                                     ANGELIB for BC7/PDS                       25                                    ___________________
  1652.  
  1653.  
  1654.  
  1655.  
  1656.           FKeys                                                      FKeys Keys$
  1657.             Displays a list of function keys at the bottom of the screen.
  1658.  
  1659.             Pass            ____
  1660.                  Keys$       String of  keys  to be  displayed (e.g.,  "EPNQ").
  1661.                              Plus sign  (+) is  a reserved character.   If  the
  1662.                              first character  is a plus  sign followed by  two-
  1663.                              digits, then the keys are placed  starting on that
  1664.                              row.  For example, "+24EPNQ" would  place the keys
  1665.                              on row 24/25, instead of the default rows 23/24.
  1666.  
  1667.             Notes            _____
  1668.  
  1669.             The file  FKEY.LST  is  seached  first  if it  is  in  the  current
  1670.             directory, then  an internal list is  searched if the  keys are not
  1671.             found.  The format of FKEY.LST ASCII file is:
  1672.  
  1673.                  KeyCode$,KeyName$,KeyDesc$,XPos%
  1674.  
  1675.             For example, a  line reading "C,Enter,Continue,51" would place  the
  1676.             key  "Enter" (in  reverse  video)  and the  description  "Continue"
  1677.             under  it at  column  51  whenever an  FKeys  "C"  is issued  in  a
  1678.             program.  See the sample FKEY.LST file.
  1679.  
  1680.             The routine scans the first screen row  at column 1 for the  colour
  1681.             to use.
  1682.  
  1683.             The keys "AacCFNoPQSsTtyn" are defined internally as follows:
  1684.                  A - Up and Down arrows
  1685.                  a - Up/Down/Right/Left arrows
  1686.                  C - Esc = Cancel
  1687.                  c - Enter = Continue
  1688.                  N - PgDn = Next
  1689.                  o - Enter = OK
  1690.                  P - PgUp = Prev
  1691.                  Q - Esc = Quit
  1692.                  S - Enter = Select
  1693.                  s - Esc = Stop
  1694.                  T - TAB = Next
  1695.                  t - BackTAB = Prev
  1696.                  y - Enter = Yes
  1697.                  n - Esc = No
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.                                     ANGELIB for BC7/PDS                       26                                    ___________________
  1718.  
  1719.  
  1720.  
  1721.  
  1722.           FmtFDD%                                                  ec% = FmtFDD%
  1723.             Format floppy disks.
  1724.  
  1725.             Pass            ____
  1726.                  Nothing
  1727.  
  1728.             Returns            _______
  1729.                  TRUE if function completed
  1730.                  FALSE if cancelled
  1731.  
  1732.             Notes            _____
  1733.                  It's easiest to give you an algorithm of the logic flow:
  1734.  
  1735.                  Search DOS PATH for WFF.EXE (What Floppy Format?)
  1736.                  If found, run it and exit
  1737.                  How many drives does this computer have?
  1738.                  If more than 1 present list
  1739.                  Issue DOS command "FORMAT d:" and exit
  1740.  
  1741.                  I always  put a  "Format Floppies" option  under my  File menu
  1742.                  which  simply  does  "i% =  FmtFDD".   See  also  FromFDD% and
  1743.                  ToFDD% functions.
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.                                     ANGELIB for BC7/PDS                       27                                    ___________________
  1784.  
  1785.  
  1786.  
  1787.  
  1788.           FontDL                          FontDL FontFile$, Pts%, Port%, FontNo%
  1789.             Downloads  a  soft  font file  to a  laser  printer and  displays a
  1790.             status window while doing so.
  1791.  
  1792.             Pass            ____
  1793.                  FontFile$   The full  file name, including  drive and path  if
  1794.                              necessary,  of   the   soft   font  file   to   be
  1795.                              downloaded.
  1796.  
  1797.                  Port%       The port number (1-3) of the printer.
  1798.  
  1799.                  FontNo%     PCL font number  to assign this font (e.g.,  400).
  1800.                              Numbers  >128 are  generally best  to  use as  the
  1801.                              lower numbers have  standard fonts which typically
  1802.                              apply to them.
  1803.  
  1804.             Returns            _______
  1805.                  Pts%        The  point size of  the font  is returned  in this
  1806.                              variable.
  1807.  
  1808.             Example            _______
  1809.                  ok% = FontDL%(FontFile$, Pts%, Port%, FontNo%)
  1810.                  if ok% then
  1811.                      PRINT #PrintFile%, chr$(27)+"("+ltrim$(str$(FontNo%))+"X"
  1812.                      end if
  1813.  
  1814.             Notes            _____
  1815.                  The above  sequence selects FontNo% as  the primary font  (the
  1816.                  '('  does  this).   To select  it  as the  secondary font  use
  1817.                  chr$(27)+"("+ltrim$(str$(FontNo%))+"X"
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.                                     ANGELIB for BC7/PDS                       28                                    ___________________
  1850.  
  1851.  
  1852.  
  1853.  
  1854.           GetDate                          GetDate d%, m%, y%, Intl%, Row%, Col%
  1855.             Accepts date from keyboard at {Row%,Col%}  unformatted (no symbols,
  1856.             just  numbers run  together).   Extended keys  (arrows, PgUp, etc.)
  1857.             will  exit  plus  a mouse  button  push  or  the  Alt  key.   Intl%
  1858.             determines the sequence of entry.
  1859.  
  1860.             Pass            ____
  1861.                  d%          Default  day (1-31),  zero to  use to-day's  date,
  1862.                              negative to skip the day
  1863.  
  1864.                  m%          Default  month number, zero to  use current month,
  1865.                              negative to skip the month
  1866.  
  1867.                  y%          Default  year  number  (4  digits),  zero  to  use
  1868.                              current year, negative to skip the year
  1869.  
  1870.                  Intl%       Country  setting   (1=US,  2=Cdn,   3=US  &   Cdn,
  1871.                              4=Other)
  1872.  
  1873.                  Row%        Screen row on which to get input
  1874.  
  1875.                  Col%        Screen column in which to get input
  1876.  
  1877.             Returns            _______
  1878.                  d%, m%, and y% are set to user's input
  1879.  
  1880.  
  1881.  
  1882.  
  1883.           GetFileDesc$                               desc$ = GetFileDesc$(file$)
  1884.             Get a  file's description  (long name) from the  DESCRIPT.* file in
  1885.             the current directory.
  1886.  
  1887.             Pass            ____
  1888.                  file$       DOS file  name.   You can specify a  drive & path,
  1889.                              but  the current  directory will  be accessed  for
  1890.                              the DESCRIPT.* file.
  1891.  
  1892.             Returns            _______
  1893.                  Description (long name) of the file.
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.                                     ANGELIB for BC7/PDS                       29                                    ___________________
  1916.  
  1917.  
  1918.  
  1919.  
  1920.           GetFileName$     afile$ = GetFileName$(InOut%, ttl$, msg$, dflt$, ms%)
  1921.             Get  a file name  from user  in a  window, verify proper  format of
  1922.             entry, and check status of file.
  1923.  
  1924.             Pass            ____
  1925.                  InOut%      Input or Output file?
  1926.                              1 =  Input file  (file must  exist; error  message
  1927.                              displayed if not) ('1' is for 'I'nput)
  1928.                              0 = Output file  (checks that file does not exist;
  1929.                              if file exists, presents a warning  that file will
  1930.                              be over-written) ('0' is for 'O'utput)
  1931.  
  1932.                  ttl$        Title of window
  1933.  
  1934.                  msg$        Help  message displayed  on the  screen below  the
  1935.                              file entry window
  1936.  
  1937.                  dflt$       Default response
  1938.  
  1939.                  ms%         Mouse flag (0=no mouse, non-zero=use mouse)
  1940.                              Mouse cursor should be invisible (off)
  1941.  
  1942.             Returns            _______
  1943.                  Name of file, including drive and path (if entered)
  1944.  
  1945.  
  1946.  
  1947.  
  1948.           GetFileNames$   files$ = GetFileNames$(InOut%, ttl$, msg$, dflt$, ms%)
  1949.             Same as  GetFileName$ except  that user can  specify more  than one
  1950.             input file.
  1951.  
  1952.             Pass            ____
  1953.                  InOut%      Input or Output file?
  1954.                              1  = Single input file
  1955.                              -1 = Multiple input files
  1956.                              0  = Output file
  1957.  
  1958.             Everything else is the same as GetFileName$() above.
  1959.  
  1960.             Returns            _______
  1961.                  Drive and  path (if entered) followed  by file name(s)  padded
  1962.             to 12 spaces.
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.                                     ANGELIB for BC7/PDS                       30                                    ___________________
  1982.  
  1983.  
  1984.  
  1985.  
  1986.           GetFontInfo                      GetFontInfo File$, FontName$, PtSize%
  1987.             Provides name  &  size in  the header  of a  soft font  file.   Try
  1988.             FontDL% on your laser for a demonstration of this.
  1989.  
  1990.             Pass            ____
  1991.                  File$       The name  of the  soft font,  including drive  and
  1992.                              path, if necessary.
  1993.  
  1994.             Returns            _______
  1995.                  FontName$   The  long name  of the  font is  returned in  this
  1996.                              variable, if present  (some fonts do not have  any
  1997.                              name in the header)
  1998.  
  1999.                  PtSize%     In  the font file's header  is a point size -- the
  2000.                              integer  value   of  this  is  returned   (decimal
  2001.                              chopped off).   Although this  should be the  real
  2002.                              point size, it's possible for it to be wrong.
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.                                     ANGELIB for BC7/PDS                       31                                    ___________________
  2048.  
  2049.  
  2050.  
  2051.  
  2052.           GetNum$       n$ = GetNum$(iRow%, iCol%, NumMask$, OrigNo$, ExitCode%)
  2053.             Get formatted  numerical input  from user.   Screen colours  at the
  2054.             specified  location will be inverted during input and restored upon
  2055.             exit.
  2056.  
  2057.             Pass            ____
  2058.                  iRow%       Row at which to get input
  2059.  
  2060.                  iCol%       Left column at which to get input
  2061.  
  2062.                  NumMask$    Format  mask.   Valid  mask  characters  are pound
  2063.                              (#),  dollar ($),  and  comma  (,); all  else  are
  2064.                              literals (same  as PRINT  USING).  E.g.,  "#,###",
  2065.                              "$$##.##" or "(###) ###-####".
  2066.  
  2067.                  OrigNo$     Default number in string  form to avoid  numerical
  2068.                              data type conflicts.   Can be integer or  floating
  2069.                              point.
  2070.  
  2071.             Returns            _______
  2072.                  User's  entry as  a string  (use VAL  to  extract it  into the
  2073.                  proper variable; for example, Cost@=VAL(A$) or Miles%=VAL(A$)
  2074.  
  2075.                  ExitCode%   ASCII value  of key user pressed  to exit.   E.g.,
  2076.                              Esc =  27.   If an extended  key (e.g.,  F4, PgUp,
  2077.                              etc.) is used ExitCode% is negative.
  2078.  
  2079.             Example            _______
  2080.                  A$=GetNum$(15,30,"$$###.##",STR$(UnitPrice@),ExitCode%)
  2081.  
  2082.                  In  the  above  example  an input  field  will  be created  at
  2083.                  location (15,30).   The original  number, UnitPrice@, will  be
  2084.                  formatted and  displayed using the  mask "$$###.##", then  the
  2085.                  computer will  wait for the  user's input.   The key that  the
  2086.                  user  presses  to  exit  the field  will  be  returned in  the
  2087.                  variable ExitCode%.
  2088.  
  2089.                  See FKEYS.BI for key definitions.
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.                                     ANGELIB for BC7/PDS                       32                                    ___________________
  2114.  
  2115.  
  2116.  
  2117.  
  2118.           GetValidPath                       GetValidPath Drv$, path$, Msg$, ms%
  2119.             Displays  Msg$ then asks user for  a valid path name, defaulting to
  2120.             Drv$ and Path$.   If  path does  not exist  user is  asked if  s/he
  2121.             wants to create it.
  2122.  
  2123.             Pass            ____
  2124.                  Drv$        Default drive (e.g., "C:")
  2125.  
  2126.                  Path$       Default path (e.g., "\TEST\DIR")
  2127.  
  2128.                  Msg$        Helpful message  to display on  the screen  (using
  2129.                              Inform%)
  2130.  
  2131.                  ms%         0=No mouse, 1=Use mouse
  2132.  
  2133.             Returns            _______
  2134.                  Drv$        Selected drive letter followed by a colon
  2135.  
  2136.                  Path$       Selected path  with trailing  foreslash (\) (e.g.,
  2137.                              "\TEST\DIR\")
  2138.  
  2139.             Notes            _____
  2140.                  The  mouse must be initialized and visible to use it.  To keep
  2141.                  things simple  & save  stack space, the  windows are  at fixed
  2142.                  positions (which also helps keep things consistent, too).
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.                                     ANGELIB for BC7/PDS                       33                                    ___________________
  2180.  
  2181.  
  2182.  
  2183.  
  2184.           GoodbyeScreen          GoodbyeScreen Pkg$, Reg%, FirstUse$, TimesUsed%
  2185.             Presents a  'goobye screen'  with which  I end  my programmes.   It
  2186.             also has  my name on it... :)   When you  register ANGELIB you will
  2187.             get a version which lets you put your copyright message on it.
  2188.  
  2189.             Pass            ____
  2190.                  Pkg$        Package abbreviation  (e.g., "WVH",  "WML", etc.).
  2191.                              Should be a short name to fit properly in window.
  2192.  
  2193.                  Reg%        Registration   flag,  true/false,   controls   the
  2194.                              information displayed
  2195.  
  2196.                  FirstUse$   Date of  first use.   Used to  calculate number of
  2197.                              days package has been used.
  2198.  
  2199.                  TimesUsed%  Number of times package has been used.
  2200.  
  2201.             Returns            _______
  2202.                  Nothing
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.                                     ANGELIB for BC7/PDS                       34                                    ___________________
  2246.  
  2247.  
  2248.  
  2249.  
  2250.           HelpIndex                                  HelpIndex Topic$, FileSpec$
  2251.             Displays a help index (menu) or a specific help screen.
  2252.  
  2253.             Pass            ____
  2254.                  Topic$      A  specific topic to look up (as  might be desired
  2255.                              with context-sensitive help).   If blank an  index
  2256.                              is presented in a scrollable menu.  Once the  user
  2257.                              selects a topic, the help text  is displayed using
  2258.                              the Inform% function.
  2259.  
  2260.                  FileSpec$   The specification  for the help  file.  If  blank,
  2261.                              "*.HLP" is used.   FileSpec$ may contain a  drive,
  2262.                              path, and/or file name (wildcards okay).
  2263.  
  2264.             Returns            _______
  2265.                  Nothing.
  2266.  
  2267.             Notes            _____
  2268.  
  2269.             The help file is an ASCII text file which is arranged like this:
  2270.  
  2271.             Topic #1+chr$(4)+Help information
  2272.               more information at least one space from left
  2273.               more help etc. etc.
  2274.             Topic #2+chr$(4)+Help info...
  2275.  
  2276.             Help  files may contain up to 100 topics.   The total length of the
  2277.             help text for a single entry is limited to 99 lines with  a maximum
  2278.             of  50 characters per line (roughly 4k of text).  Topics MUST begin
  2279.             in column  one, additional  text MUST begin  AFTER column  1 (i.e.,
  2280.             indent the help text at least one space).
  2281.  
  2282.             The topic  may begin with a chr$(1) through  chr$(3) to indicate an
  2283.             outline  level.      For  example,   you  might   have  FILE   then
  2284.             chr$(1)+Open.
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.                                     ANGELIB for BC7/PDS                       35                                    ___________________
  2312.  
  2313.  
  2314.  
  2315.  
  2316.           Inform%    ok% = Inform%(iRow%, iCol%, iWid%, iType%, ms%, snd%, Msg$)
  2317.             Displays a scrollable information window containing up to  99 lines
  2318.             of information.   Msg$ may be any  length.  The routine will  break
  2319.             the message  into lines of  iWid% length  or less.   If the box  is
  2320.             positioned too low on the screen, it will be adjusted upwards.
  2321.  
  2322.             Pass            ____
  2323.                  iRow%       Top row of window
  2324.                  iCol%       Left column of window
  2325.                  iWid%       Window width (in characters)
  2326.  
  2327.                  iType%      Determines buttons (see below)
  2328.                              0="Message" (no buttons)
  2329.                              1="Note" (Ok button)
  2330.                              2="Caution" (Ok/Cancel)
  2331.                              3="Warning" (blinking) (Continue/Stop)
  2332.                              4="Attention" (blinking) (Yes/No)
  2333.  
  2334.                  ms%         Mouse support
  2335.                              0 = No mouse
  2336.                              1 = Mouse available
  2337.                              99 = Reset mouse & use it, if available
  2338.  
  2339.                  snd%        Sound: 0=None 1=Squeak 2=Tick 3=Beep
  2340.                  Msg$        Message  to  display  in  the  window.    Will  be
  2341.                              truncated at 99 lines, if necessary.
  2342.  
  2343.             Returns            _______
  2344.                  TRUE if user presses ENTER to exit
  2345.                  FALSE if user presses ESC to exit
  2346.  
  2347.             Notes            _____
  2348.  
  2349.             All message  types except  zero restore  the screen on  exit.   Use
  2350.             iType%=0  when you want to put  information on the screen and leave
  2351.             it there, such as instructions on how to enter data.
  2352.  
  2353.             The mouse should be turned OFF before calling Inform%
  2354.  
  2355.             Custom Titles            _____________
  2356.  
  2357.             A custom title  can replace the default.   Just place a title  plus
  2358.             chr$(254) at  the start  of your message  (changed from  chr$(4) to
  2359.             allow the code to be imbedded without the use of the CHR$ function
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.                                     ANGELIB for BC7/PDS                       36                                    ___________________
  2378.  
  2379.  
  2380.  
  2381.  
  2382.           InformFill        InformFill Row%, Col%, BegLine%, WinSize%, MLines$()
  2383.             Used by Inform% -- fills the window with text.
  2384.  
  2385.  
  2386.  
  2387.  
  2388.           InputDate       InputDate Mo%, Dy%, Yr%, DtStr$, Row%, Col%, ExitCode%
  2389.             Accepts a valid date.  Unlike GetDate, InputDate only supports  the
  2390.             DD/MM/YYYY format and does not check for a mouse  button or the Alt
  2391.             key  being  pressed.   However,  the  input  is  formatted  whereas
  2392.             GetDate has all the numbers run together.
  2393.  
  2394.             Pass            ____
  2395.                  Mo%         Month number (1-12)
  2396.                              Zero for current month
  2397.                              -1 to skip month
  2398.  
  2399.                  Dy%         Day number (1-31)
  2400.                              Zero for current day
  2401.                              -1 to skip day
  2402.  
  2403.                  Yr%         Year number (4 digits)
  2404.                              Zero for current year
  2405.                              -1 to skip year
  2406.  
  2407.                  r%/c%       Screen row & column at which to display/get date
  2408.  
  2409.             Returns            _______
  2410.                  DtStr$      Date string formatted MM/DD/YYYY.
  2411.  
  2412.                  ExitCode%   Set to the key used to exit.
  2413.  
  2414.             Example 1            _________
  2415.                  M%=0: D%=0: Y%=0: row%=10: col%=20
  2416.                  InputDate M%, D%, Y%, DtStr$, row%, col%, ExitCode%
  2417.  
  2418.                  This will  get the  date at location {10,20}  using the system
  2419.                  date as default.  Because InputDate is a BASIC subroutine,  it
  2420.                  is not necessary to initialize DtStr$ before using it.
  2421.  
  2422.             Example 2            _________
  2423.                  M%=5: D%=-1: Y%=0: row%=10: col%=20
  2424.                  InputDate M%, D%, Y%, DtStr$, row%, col%, ExitCode%
  2425.  
  2426.                  This will get a  month and year at location {10,20}  using May
  2427.                  and the system clock's year as default.
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.                                     ANGELIB for BC7/PDS                       37                                    ___________________
  2444.  
  2445.  
  2446.  
  2447.  
  2448.           IsColour%                                               x% = IsColour%
  2449.             Get adapter card type.
  2450.  
  2451.             Pass            ____
  2452.                  Nothing
  2453.  
  2454.             Returns            _______
  2455.                  True (-1) if colour adapter card, otherwise False (0).
  2456.  
  2457.  
  2458.  
  2459.  
  2460.           IsPath%                                     stat% = IsPath%(Pathname$)
  2461.             Checks validity of  Pathname$, extends Pathname$ if necessary,  and
  2462.             checks if the  path exists.  Can  create a directory at the  user's
  2463.             option.  This function is called by GetValidPath.
  2464.  
  2465.             Pass            ____
  2466.                  TheName$    Path name in the format [d:][\path\]
  2467.                              If the drive or full path are missing  the current
  2468.                              drive/path are inserted
  2469.  
  2470.             Returns            _______
  2471.                  0 = Path not found/not created (suitable for _O_utput)
  2472.                  1 = Path exists (suitable for _I_nput)
  2473.                  -1 = Bad path specification, or -2 = Other error
  2474.  
  2475.                  TheName$    Contains the  fully extended  path name  including
  2476.                              the drive  letter unless user  hit Esc when  asked
  2477.                              permission to create the directory.
  2478.  
  2479.             Example            _______
  2480.             Assume the current path is C:\ugh\ and no directories under it.
  2481.  
  2482.                  Path$ = "test"
  2483.                  stat% = IsPath%(Path$)
  2484.                  select case stat%
  2485.                       case 0    'Path not found & not created (user hit Esc)
  2486.                       case 1    'Path found, everything okay
  2487.                       case is < 0  'Bad path specification or DOS error
  2488.  
  2489.             Inform user that C:\ugh\test\  does not exist & ask to create.   If
  2490.             "No" stat%=0 & Path$="test", else stat%=1 & Path$="C:\ugh\test\"
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.                                     ANGELIB for BC7/PDS                       38                                    ___________________
  2510.  
  2511.  
  2512.  
  2513.  
  2514.           Max%                                           Highest% = Max%(A%, B%)
  2515.             Returns the larger of the two integers
  2516.  
  2517.  
  2518.  
  2519.  
  2520.           MaxL&                                         Highest& = MaxL&(A&, B&)
  2521.             Returns the larger of two long integers.
  2522.  
  2523.  
  2524.  
  2525.  
  2526.           MaxS!                                         Highest! = MaxS!(A!, B!)
  2527.             Returns the larger of two single-precision floating point numbers.
  2528.  
  2529.  
  2530.  
  2531.  
  2532.           Min%                                            Lowest% = Min%(A%, B%)
  2533.             Returns the smaller of two integers.
  2534.  
  2535.  
  2536.  
  2537.  
  2538.           MinL&                                          Lowest& = MinL&(A&, B&)
  2539.             Returns the smaller of two long integers.
  2540.  
  2541.  
  2542.  
  2543.  
  2544.           MinS!                                          Lowest! = MinS!(A!, B!)
  2545.             Returns the smaller of two single precision numbers.
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.                                     ANGELIB for BC7/PDS                       39                                    ___________________
  2576.  
  2577.  
  2578.  
  2579.  
  2580.           MonthDays%                                NoDays% = MonthDays%(M%, Y%)
  2581.             Returns the number of days in month M% of year Y%.
  2582.  
  2583.             Pass            ____
  2584.                  M%          Month (1-12)
  2585.                  Y%          Year (2 or 4 digits)
  2586.  
  2587.             Returns            _______
  2588.                  Number of days in the specified month
  2589.  
  2590.             Example            _______
  2591.                  MonthDays%(2,1992) returns 29
  2592.  
  2593.  
  2594.  
  2595.  
  2596.           OutDev$                                    PDev$ = OutDev$(Port%, ms%)
  2597.             Presents a menu of output devices: Screen, Printer, and Disk  File.
  2598.             If Disk  File is  selected the  user is  prompted for  a file  name
  2599.             (using  GetFileName$).   If Printer is selected  the routine checks
  2600.             if the printer is on-line (that's  partly why Port% is needed)  and
  2601.             returns the device  name as  "LPT1:", "LPT2:",  or "LPT3:"  (that's
  2602.             also why Port% is needed).
  2603.  
  2604.             Pass            ____
  2605.                  Port%       Port number of printer (1, 2, or 3)
  2606.  
  2607.                  ms%         Mouse support:  0=no, non-zero=yes
  2608.  
  2609.             Returns            _______
  2610.                  Device or file name
  2611.  
  2612.  
  2613.  
  2614.  
  2615.           OutDevs$                                  PDev$ = OutDevs$(Port%, ms%)
  2616.             Same  as   OutDev$  function,  but   for  use  with   ChooseFiles$,
  2617.             FileRestore2%, GetFileNames$, and SelectSoftFonts% routines.
  2618.  
  2619.             See OutDev$ function for details.
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.                                     ANGELIB for BC7/PDS                       40                                    ___________________
  2642.  
  2643.  
  2644.  
  2645.  
  2646.           ParseFSpec             ParseFSpec TheName$, Drv$, Pathname$, TheName2$
  2647.             Searches file name for the drive, path, and NAME.EXT components.
  2648.  
  2649.             Pass            ____
  2650.                  TheName$    Full file name to parse
  2651.  
  2652.             Returns            _______
  2653.                  Drv$        Drive letter followed by a colon (if present)
  2654.  
  2655.                  Pathname$   Path  name, beginning and  ending with a foreslash
  2656.                              (\), if present
  2657.  
  2658.                  TheName2$   FILENAME.EXT, if present
  2659.  
  2660.             Notes            _____
  2661.  
  2662.             Converts the  regular slash (/)  to a foreslash  (\), in case  user
  2663.             enters the wrong one.
  2664.  
  2665.             If  an invalid file name  is entered (for  example, more than eight
  2666.             characters  in  the  name  or more  than  three  characters in  the
  2667.             extension) then TheName2$ is returned as a blank string.
  2668.  
  2669.             The  original file name, TheName$, is  not changed so that if there
  2670.             is an error it can be given to the user for editing again.
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.                                     ANGELIB for BC7/PDS                       41                                    ___________________
  2708.  
  2709.  
  2710.  
  2711.  
  2712.           PctDone                                       PctDone Percent%, title$
  2713.             Displays a  graph of  percentage completion in  a small box  on the
  2714.             screen. If  the process  takes longer than 20  seconds a count-down
  2715.             timer will appear below the graph.
  2716.  
  2717.             Pass            ____
  2718.                  Percent%    Percentage to  draw on the  graph.  The first time
  2719.                              PctDone is called a  small window is  drawn.  When
  2720.                              Percent% is 100 the window is erased.
  2721.  
  2722.                  title$      A  short title (10  chars max) to display over the
  2723.                              progress bar.
  2724.  
  2725.             Returns            _______
  2726.                  Nothing
  2727.  
  2728.             Notes            _____
  2729.  
  2730.             You must  call PctDone with  100 to clear it  or the  next time you
  2731.             call it it will think the window is still on the screen...
  2732.  
  2733.             Example            _______
  2734.                  For Sort%=0 to Y%
  2735.                      if 100 * Sort% \ Y% < 100 then
  2736.                          PctDone(100 * Sort% \ Y%,"Sorting")
  2737.                          endif
  2738.                      do something...
  2739.                      next Sort%
  2740.                  PctDone 100,""    'Close the window/reset the routine
  2741.  
  2742.  
  2743.  
  2744.  
  2745.           PrintRptMsg                                           PrintRptMsg Msg$
  2746.             Displays a window saying  "Printing "+Rpt$+" Press  Esc to cancel."
  2747.             I use this on every report so I made it into a routine.
  2748.  
  2749.             Example            _______
  2750.                  Rpt$ = "Stock Status Report"
  2751.                  PrintRptMsg Rpt$
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.                                     ANGELIB for BC7/PDS                       42                                    ___________________
  2774.  
  2775.  
  2776.  
  2777.  
  2778.           PtrReady%                                       ok% = PtrReady%(Port%)
  2779.             Checks if printer on LPT[Port%] is on-line.
  2780.  
  2781.             Pass            ____
  2782.                  Port%       Printer port (1, 2, or 3)
  2783.  
  2784.             Returns            _______
  2785.                  TRUE if ready, FALSE if not
  2786.  
  2787.             Notes            _____
  2788.                  It doesn't matter whether or not you  have opened a channel to
  2789.                  the printer before calling this routine.
  2790.  
  2791.  
  2792.  
  2793.  
  2794.           QSort    QSort Wrk%(), Arr1$(), Arr2$(), NoDims%, NoItems%, SortField%
  2795.             A good public domain sorting  method.  Used by ChooseFile$ to  sort
  2796.             the file list.
  2797.  
  2798.             See  the source code in QSORT.SUB.  This is  not my code -- I'm not
  2799.             selling it, I just use it and pass it on to you...
  2800.  
  2801.  
  2802.  
  2803.  
  2804.           Repl$                                cmd$ = Repl$(St$, Target$, Item$)
  2805.             Replaces occurence of  Target$ in St$ with  Item$.  Good for  laser
  2806.             printer codes.
  2807.  
  2808.             Pass            ____
  2809.                  St$         Complete string
  2810.  
  2811.                  Target$     The part of St$ to be replaced
  2812.  
  2813.                  Item$       The replacement for Target$
  2814.  
  2815.             Returns            _______
  2816.                  The modified string with trailing spaces & nulls truncated.
  2817.  
  2818.             Example            _______
  2819.                  Repl$("&a#V ","#","500") will return "&a500V"
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.                                     ANGELIB for BC7/PDS                       43                                    ___________________
  2840.  
  2841.  
  2842.  
  2843.  
  2844.           SayOk                                            SayOk Row%, Col%, ms%
  2845.             Puts an  "Ok" button centred  at position {Row%, Col%}  and puts an
  2846.             "Enter / Continue" message  at the bottom of the screen.   Mouse or
  2847.             keyboard can be used to exit.
  2848.  
  2849.             Pass            ____
  2850.                  Row%        Row on which to place button
  2851.                  Col%        Middle of button
  2852.                  ms%         Use mouse support? (True/False)
  2853.  
  2854.             Returns            _______
  2855.                  Nothing
  2856.  
  2857.             Notes            _____
  2858.                  Scans screen at  {Row%-1, Col%} and inverts the colours  found
  2859.             there -- the idea  being to make the button stand out from the lines
  2860.             above it.
  2861.                  If  ms% is non-zero (True)  then the mouse must be initialized
  2862.             but invisible.
  2863.  
  2864.  
  2865.  
  2866.  
  2867.           SearchPath$                                a$ = SearchPath$(FileName$)
  2868.             Searches the DOS PATH environment variable for a file.
  2869.  
  2870.             Pass            ____
  2871.                  FileName$   Name of file for which to search  (file name only;
  2872.                              no drive or path)
  2873.  
  2874.             Returns            _______
  2875.                  If file is found, DOS path with trailing foreslash (\)
  2876.                  If file is not found, returns blank string ("")
  2877.  
  2878.             Example            _______
  2879.                  Assuming you have C:\ in your search path...
  2880.  
  2881.                  A$ = SearchPath$("Config.sys")
  2882.  
  2883.                  will set A$ = "C:\"
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.                                     ANGELIB for BC7/PDS                       44                                    ___________________
  2906.  
  2907.  
  2908.  
  2909.  
  2910.           SelectFont%    ok% = SelectFont%(m$,path$,PtrNo%,Pts%,Ext$,SFdir$,ms%)
  2911.             Displays  a scrollable list of soft fonts in a window and waits for
  2912.             user to select  one or press Esc.   List  will show DOS file  name,
  2913.             font  name (if present  in header)  and point  size (if  present in
  2914.             header).
  2915.  
  2916.             Pass            ____
  2917.                  m$          Purpose  of  font,  displayed  at  top  of  window
  2918.                              (e.g., "Printing", "Reports", "Titles", etc.)
  2919.  
  2920.                  path$       File  specification  for  PRINTER.DAT file.  path$
  2921.                              may contain a  drive, path, and/or  file name.  If
  2922.                              no file  name is given,  PRINTER.DAT is  used.  If
  2923.                              no drive  & path are  given, the  current drive  &
  2924.                              path are used.
  2925.  
  2926.                  PtrNo%      The printer's record number in PRINTER.DAT
  2927.  
  2928.                  Ext$        Soft  font   file  extension   (e.g.,  "SFP"   for
  2929.                              portrait fonts, "SFL" for landscape fonts)
  2930.  
  2931.                  SFdir$      Default soft font directory (e.g., "C:\Fonts")
  2932.  
  2933.                  ms%         Mouse support:  0=no mouse, 1=use mouse
  2934.  
  2935.             Returns            _______
  2936.                  Function returns font's  record number in PRINTER.DAT or  zero
  2937.                  if user presses Esc
  2938.  
  2939.                  m$          Changed  to soft font  file name  (including path)
  2940.                              if soft font selected
  2941.  
  2942.                  Pts%        Changed to point size if scalable font
  2943.  
  2944.                  SFdir$      Soft font directory with any user modifications
  2945.  
  2946.             Notes            _____
  2947.                  Mouse must be initialized but turned OFF
  2948.  
  2949.  
  2950.  
  2951.  
  2952.           SelectFonts%  ok% = SelectFonts%(m$,path$,PtrNo%,Pts%,Ext$,SFdir$,ms%)
  2953.             Same as SelectFont%()  function except that it uses  ChooseFileS$()
  2954.             (instead of ChooseFile$()).
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.                                     ANGELIB for BC7/PDS                       45                                    ___________________
  2972.  
  2973.  
  2974.  
  2975.  
  2976.           SelectFontSize%             Pts% = SelectFontSize%(Font$, IsPts%, ms%)
  2977.             This routine  gets the  user's choice  for font  size in a  window.
  2978.             This routine  is called  whenever a  scalable font  is selected  in
  2979.             SelectFont% (I don't ever use this routine directly).
  2980.  
  2981.             Pass            ____
  2982.                  Font$       The font  name  (for  displaying on  the  screen).
  2983.                              For example, CG Times.
  2984.  
  2985.                  IsPts%      Logical  flag  to indicate  whether point  size is
  2986.                              needed  (versus   character  pitch).     If   true
  2987.                              "points"  is   displayed;   otherwise  (if   zero)
  2988.                              "character pitch" is displayed on screen.
  2989.  
  2990.                  ms%         Mouse flag: 0=no mouse, 1=use mouse
  2991.  
  2992.             Returns            _______
  2993.                  Font size (integer) or zero if user presses Esc.
  2994.  
  2995.             Notes            _____
  2996.                  This  routine  is  called  by  SelectFont%.    Mouse  must  be
  2997.             initialized but turned OFF (invisible cursor).
  2998.  
  2999.  
  3000.  
  3001.  
  3002.           SelectSoftFont$              Font$ = SelectSoftFont$(Path$, Ext$, ms%)
  3003.             This routine presents a scrollable list of soft fonts  in a window.
  3004.             It  is called by  SelectFont% if  the user selects  a soft font (as
  3005.             opposed to a font built into the printer).
  3006.  
  3007.             Pass            ____
  3008.                  Path$       Path to soft fonts
  3009.  
  3010.                  Ext$        Extension to be included in the  list (e.g., "SFP"
  3011.                              for portrait fonts)
  3012.  
  3013.                  ms%         Mouse support (0=no, 1=yes)
  3014.  
  3015.             Returns            _______
  3016.                  Name of chosen font, including drive & path, if necessary.
  3017.  
  3018.                  Path$       Path as modified by user
  3019.  
  3020.             Notes            _____
  3021.                  Uses ChooseFile$() function
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.                                     ANGELIB for BC7/PDS                       46                                    ___________________
  3038.  
  3039.  
  3040.  
  3041.  
  3042.           SelectSoftFonts$            Font$ = SelectSoftFonts$(Path$, Ext$, ms%)
  3043.             Same as SelectSoftFont$() except  this routine uses  ChooseFileS$()
  3044.             instead of ChooseFile$().
  3045.  
  3046.  
  3047.  
  3048.  
  3049.           StrFmt$                            ph$ = StrFmt$(Mask$, St$, reverse%)
  3050.             Formats a  string according to a given mask.  I  use this to format
  3051.             phone numbers, zip codes, etc.
  3052.  
  3053.             Pass            ____
  3054.                  Mask$       Mask (like PRINT USING masks)
  3055.                  St$         String to format
  3056.                  reverse%    Flag: if  TRUE formatting  is done  from right  to
  3057.                              left; if  FALSE (0) formatting  is done from  left
  3058.                              to right. TRUE is the most common setting.
  3059.  
  3060.             Returns            _______
  3061.                  Formatted string
  3062.  
  3063.             Examples            ________
  3064.                  a$ = StrFmt$("8052662574","(###) ###-####",-1)
  3065.                  returns a$ = "(805) 266-2574"
  3066.  
  3067.                  a$ = StrFmt$("2726893","(###) ###-####",-1)
  3068.                  returns a$ = "(   ) 272-6893"
  3069.  
  3070.                  a$ = StrFmt$("93551","#####-####",0)
  3071.                  returns a$ = "93551-    "
  3072.  
  3073.  
  3074.  
  3075.  
  3076.           StripSymbols$                               new$ = StripSymbols$(Old$)
  3077.             This strips any  symbols from  a string of  numbers.   I use it  to
  3078.             strip  the parenthesis, etc. from  phone numbers, etc.  Returns the
  3079.             string St$ stripped of its parenthesis, dashes, and commas.
  3080.  
  3081.             Example            _______
  3082.                  a$ = StripSymbols$("(805) 272-4923")
  3083.  
  3084.                  returns a$ = "8052724923"
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.                                     ANGELIB for BC7/PDS                       47                                    ___________________
  3104.  
  3105.  
  3106.  
  3107.  
  3108.           Trim$                                                   b$ = Trim$(a$)
  3109.             Trims  leading  & trailing  spaces  and trailing  chr$(0)'s from  a
  3110.             string  (using LTRIM$/RTRIM$ will remove  spaces but not nulls).  I
  3111.             use this to  test the length  of static  strings, which are  padded
  3112.             with CHR$(0)'s.
  3113.  
  3114.  
  3115.  
  3116.  
  3117.           ZipFmt$                                   a$ = ZipFmt$(TheZip$, Intl%)
  3118.             Formats a zip code according to Intl% flag.
  3119.  
  3120.             Pass            ____
  3121.                  TheZip$     Unformatted Zip/Postal code
  3122.  
  3123.                  Intl%       1 = USA
  3124.                              2 = Canada
  3125.                              3 = USA plus Canada
  3126.                              4 = Canada plus USA
  3127.                              5 = All others (no formatting)
  3128.  
  3129.             Returns            _______
  3130.                  Formatted zip
  3131.                              USA -- #####-####
  3132.                              Canada -- A#A #A#
  3133.                              Other -- No formatting
  3134.  
  3135.  
  3136.  
  3137.  
  3138.           zTrim$                                                 b$ = zTrim$(a$)
  3139.             This  routine only trims trailing nulls [chr$(0)]  from the string.
  3140.             Good for  trimming fixed-length file fields  which are padded  with
  3141.             nulls when you don't want to remove any spaces  [chr$(32)] from the
  3142.             string.
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.                                     ANGELIB for BC7/PDS                       48                                    ___________________
  3170.  
  3171.  
  3172.  
  3173.  
  3174.           XII. USING PRINTER FUNCTIONS
  3175.  
  3176.                In order to use the printer functions, you will need to include
  3177.           the data structures definition file PtrRec.DEF in your source code. 
  3178.           Place the line '$INCLUDE: 'PtrRec.DEF' near the beginning of your
  3179.           code.
  3180.  
  3181.                Next, you will need to dimension the variables to hold the
  3182.           records.  I often do this at the routine level rather than declaring
  3183.           global (common) variables, but either way will work fine unless your
  3184.           programme is strapped for memory one way or the other.  At the routine
  3185.           level just DIMension; to make the variables global use DIM SHARED. 
  3186.           The record types are:
  3187.  
  3188.                LaserPtrRec - Control codes which are not font-specific
  3189.                LaserFontRec - Font-specific control codes
  3190.                DMPtrRec - Dot matrix codes which are not font-specific
  3191.                DMFontRec - Font-specific dot matrix control codes
  3192.  
  3193.                The records are all the same length so that the single file,
  3194.           PRINTER.DAT, can contain all four record types.  Laser printer records
  3195.           start with a greater-than (>) sign (for example, ">Panasonic KX-
  3196.           P4450").  Dot matrix printer records start with a dot (for example,
  3197.           ".NEC P5300").  Both record types (dot matrix and laser) begin with a
  3198.           Model field, so you can use a LaserPtrRec variable to read a dot
  3199.           matrix record, then, if the Model begins with a period, re-read the
  3200.           record as a DMPtrRec variable.  To illustrate:
  3201.  
  3202.           DIM Lz as LaserPtrRec
  3203.           DIM DM as DMPtrRec
  3204.           PtrFile% = FREEFILE
  3205.           OPEN "Printer.DAT" FOR RANDOM ACCESS READ AS PtrFile% LEN = LEN(Lz)
  3206.           GET #PtrFile%, PtrRec%, Lz
  3207.           IF LEFT$(Lz.Model, 1) = "." THEN
  3208.                GET #PtrFile%, PtrRec%, DM
  3209.                END IF
  3210.  
  3211.                You need to use this information whenever printing a report in
  3212.           your application.  Use the ChoosePtr% function to get and save the
  3213.           user's choice for a printer and use SelectFont% to get the user's font
  3214.           choice(s).  This information can be saved in a configuration file. 
  3215.           Then, before printing, use the above routine to get the printer
  3216.           control codes (such as reset, bold, underline, etc.) followed by a
  3217.           routine like the example below to get the font control codes (such as
  3218.           select) and information such as its size and spacing.
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.                                     ANGELIB for BC7/PDS                       49                                    ___________________
  3236.  
  3237.  
  3238.  
  3239.  
  3240.                Much like the above example, here is how to read a font record:
  3241.  
  3242.           DIM LF as LaserFontRec
  3243.           DIM DF as DMFontRec
  3244.           ' Normally you would already have PtrFile% open from the above
  3245.           ' routine (to read the printer codes).  If not, you would need
  3246.           ' to open the file as in the above routine.
  3247.           m$ = "Reports": Ext$ = "SFP"                     'Portrait fonts (SFP)
  3248.           FontRec%=SelectFont%(m$, PtrRec%, Pts%, Ext$, SFdir$, ms%)
  3249.           SELECT CASE FontRec%                                     'Check result
  3250.                CASE 0                                       'User hit Escape key
  3251.                  EXIT SUB
  3252.                CASE -1                                     'User chose soft font
  3253.                  PRINT #PrintFile%, zTrim$(Lz.Init);                'Reset laser
  3254.                  Done% = FontDL(SFont$, FPts%, PtrPort%, 400)     'Download font
  3255.                  IF NOT Done% THEN
  3256.                              'User aborted download; flag routine as 'cancelled'
  3257.                    EXIT FUNCTION or SUB
  3258.                    END IF
  3259.                  IF FPts% > 0 THEN                           'FontDL got a size?
  3260.                      Fcpi% = 120 \ FPts%      'Cvt points to rough CPI for calcs
  3261.                    ELSE                                     'No size in font hdr
  3262.                      Fcpi% = 10                     'Assume 12pt/10cpi for calcs
  3263.                    END IF
  3264.                  PRINT #PrintFile%, CHR$(27); ")400X";       'Secondary, ID #400
  3265.                CASE ELSE
  3266.                  IF Ptr$ = "D" THEN                          'DOT MATRIX PRINTER
  3267.                      GET #PtrFile%, FontRec%, DF
  3268.                      PRINT #PrintFile%, zTrim$(DM.Init);                  'Reset
  3269.                      PRINT #PrintFile%, zTrim$(DF.Select);          'Select font
  3270.                      T$=Trim$(DM.HTab) + CHR$(2 * Fcpi) + CHR$(0)  'Set tab @ 2"
  3271.  
  3272.                    ELSE                                           'LASER PRINTER
  3273.                      GET #PtrFile%, FontRec%, LF
  3274.                      PRINT #PrintFile%, zTrim$(LF.SymSet2);      'Make secondary
  3275.                      PRINT #PrintFile%, zTrim$(LF.Select2);     'Use SymSet1 etc
  3276.                      PRINT #PrintFile%, zTrim$(LF.Spacing);     'to make Primary
  3277.                      IF VAL(LF.Pitch) = 0 THEN                   'Scalable font?
  3278.                        PRINT #PrintFile%,LTRIM$(STR$(Pts%));         'Point size
  3279.                        END IF                                '(from SelectFont%)
  3280.                      PRINT #PrintFile%, zTrim$(LF.Pitch);      'Pitch select cmd
  3281.                      PRINT #PrintFile%, zTrim$(LF.Slant);        'Upright/italic
  3282.                      PRINT #PrintFile%, zTrim$(LF.Weight);       'Light/Med/Bold
  3283.                      PRINT #PrintFile%, zTrim$(LF.Number);      'PCL font number
  3284.                      IF RIGHT$(zTrim$(LF.Pitch), 1) = "h" THEN     'Mono-spaced?
  3285.                          Fcpi% = VAL(LF.Pitch)                        'Store cpi
  3286.                          FPts% = 120 \ temp1%       'Cvt cpi to rough pts if nec
  3287.                        ELSE
  3288.                          FPts% = VAL(LF.Pitch)                     'Store points
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.                                     ANGELIB for BC7/PDS                       50                                    ___________________
  3302.  
  3303.  
  3304.  
  3305.  
  3306.                          Fcpi% = 120 \ TPts%        'Cvt pts to rough cpi if nec
  3307.                        END IF
  3308.                    END IF
  3309.                END SELECT
  3310.           CLOSE #PtrFile%
  3311.  
  3312.                Now you have the printer ready to go and you have the variables
  3313.           Fcpi% and Fpts% to work with in calculating TAB locations, line
  3314.           length, etc.
  3315.  
  3316.                You will notice that I use zTrim$() rather than just printing a
  3317.           variable.  This is because BASIC pads TYPE fields with nulls -
  3318.           CHR$(0)'s.  The zTrim$() function removes CHR$(0)'s but leaves
  3319.           trailing spaces (which may be part of the command string).
  3320.  
  3321.                There are some things that you must know, such as that the PCL
  3322.           pitch ends in "h" if it is mono-spaced (cpi) and "v" if it is
  3323.           proportionally-spaced (points).  Also, in setting a TAB string in the
  3324.           above example I used the Epson-standard which terminates the setting
  3325.           of TABs with a CHR$(0).  This is the best solution I have come up
  3326.           with, and every printer I've seen in the past five years uses Epson
  3327.           codes anyhow, so I figure this technique will work 90% of the time or
  3328.           better.
  3329.  
  3330.                You can make your own PRINTER.DAT file or modify the one supplied
  3331.           just by using the PtrRec.DEF file.  Someday soon I will make a
  3332.           programme for modifying the PRINTER.DAT file, but for now it will have
  3333.           to be done manually.  I would really appreciate it if you would share
  3334.           with me any new printers you install by sending me your modified
  3335.           PRINTER.DAT file.
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.